﻿using System.ComponentModel.DataAnnotations;
using db = XRM.Security.DataAccess.Models;

namespace XRM.Security.WebUI.Models.Department
{
    public class DepartmentAddressModel : BaseViewModel
    {
        public DepartmentAddressModel()
        {
        }

        public DepartmentAddressModel(db.DepartmentAddress dbEntity)
        {
            if (dbEntity != null)
            {
                Id = dbEntity.DepartmentAddressId;
                Address = dbEntity.Address;
            }
        }

        [Display(Name = "Адрес")]
        [MaxLength(250, ErrorMessage = "Максимальная длина поля 'Адрес' 250 символов")]
        public string Address { get; set; }
        public bool CanDelete { get; set; }
    }
}